package com.designpatternspart2.creationaldesignpatterns.singleton;

/**
 * File Name: SingletonExample.java
 * Version:
 * Description:
 * Package: com.designpatternspart2.singleton
 * Author: Lance
 * Date: Apr 25, 2012
 */
public class SingletonExample
{

    private static SingletonExample singletonExample = null;

    private SingletonExample()
    {
    }

    public static SingletonExample getInstance()
    {
        if (singletonExample == null)
        {
            singletonExample = new SingletonExample();
        }
        return singletonExample;
    }

    public void sayHello()
    {
        System.out.println("Hello");
    }
}
